<template>
    <el-main>
        <articleComponents v-for="item in list" :key="item.id" :article="item"></articleComponents>
    </el-main>
</template>

<script>
import articleComponents from "./components/articleComponents"
import articleApi from '~/api/article'
export default {
    name: "myArticle",
    components: { articleComponents },
    data() {
        return {
            articleObj: {},
            list: [],
        }
    },
    methods: {
        getList() {
            this.articleObj.userId = this.$store.getters.userid
            articleApi.getArticleListByUserId(this.articleObj).then(res => {
                this.list = res.data
            })
            console.log(this.list)
        },
        handleSizeChange(val) {
            this.pageSize = val
            this.getList();
        },
        handleCurrentChange(val) {
            this.page = val
            this.getList();
        },
    }
}
</script>

<style></style>
